<template>
    <div class="container">
        <leftmenu></leftmenu>
        <headerinfo></headerinfo>
        <div class="header">
            <spglheader @mode="changeModel"></spglheader>
        </div>
        <div class="spgl">
            <div class="main2">
                <div class="modelA" v-if="isSeen">
                    <div v-for="i in 10" v-bind:key="i" class="modelAson">
                        <img src="../../imgs/timo.jpg">
                        <span class="price">￥29.9</span>
                        <span class="goodname">物品名称</span>
                        <span class="icon">
                            <a href="#">
                                <i class="fa fa-pencil-square-o" aria-hidden="true"></i>
                            </a>
                            <a href="#">
                                <i class="fa fa-trash-o" aria-hidden="true"></i>
                            </a>
                        </span>
                    </div>
                </div>
                <div class="modelB" v-else>
                    <div class="modelBson" v-for="i in 5" v-bind:key="i">
                        <img src="../../imgs/timo.jpg">
                        <span class="title">货品名称货品名称货品名称</span>
                        <span class="price">￥29.99</span>
                        <span class="status">拣货中</span>
                        <span class="icon">
                            <a href="#">
                                <i class="fa fa-pencil-square-o" aria-hidden="true"></i>
                            </a>
                            <a href="#">
                                <i class="fa fa-trash-o" aria-hidden="true"></i>
                            </a>
                        </span>
                    </div>
                </div>

            </div>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            isSeen: true,
        }
    },
    methods: {
        changeModel(childSeen) {
            // console.log(childSeen);
            this.isSeen = !childSeen;
        }
    }

}
</script>

<style scoped>
.modelBson .icon {

    position: relative;
    left: 64%;
    top: -35%;
    font-size: 25px;

}

.modelBson .status {

    position: relative;
    top: -43%;
    left: 48%;
}

.modelBson .price {

    left: 37%;
    top: -43%;
    position: relative;
}

.modelB .modelBson .title {
    position: relative;
    top: -50%;
    left: 20%;
}

.modelB .modelBson {
    position: relative;
    top: 3%;
    width: 100%;
    height: 15%;
    margin-top: 22px;
}

.modelB .modelBson img {
    width: 7%;
    position: relative;
    left: 3%;
    border-radius: 14%;
    overflow: hidden;
}

.fa-edit:before,
.fa-pencil-square-o:before {
    content: "\f044";
    position: relative;
    left: -100%;
}

.modelA .modelAson .icon {
    top: -10%;
    left: -10%;
    display: flex;
    justify-content: flex-end;
    position: relative;
    font-size: 20px;
}

.modelA .modelAson .icon i {
    content: "\f14b";
    left: -90%;

}


.modelA .goodname {
    position: relative;
    left: -21%;
    top: -4%;
}

.modelA .price {
    position: relative;
    left: 38%;
    top: -12%;
    /* border: 1px solid; */
}

.modelAson img {
    width: 70%;
    position: relative;
    margin: 17%;
    /* border: 1px solid pink; */
}

.modelAson {
    width: 15%;
    height: 40%;
    /* border: 1px solid wheat; */
    float: left;
    margin: 2%;
    background-color: whitesmoke;
}

.modelA {
    position: relative;
    left: 3%;

    /* border: 2px solid red; */
    height: 100%;
    border-radius: 15%;
}

.modelB {
    /* border: 2px solid rgb(67, 6, 209); */
    height: 100%;
    border-radius: 14%;
    background-color: whitesmoke;
}

.header {
    /* border: 1px solid pink; */
    width: 83%;

    height: 12%;
    top: 10%;
    left: 16%;
    position: absolute;
    
}

.spgl {

    background-color: silver;
    /* border: 1px solid black; */
    width: 83%;
    height: 78%;
    position: absolute;
    left: 16%;
    top: 22%;

}

.main2 {
    border-radius: 2%;
    background-color: white;
    width: 96%;
    height: 93%;
    margin: 0px auto;
    left: 0%;
    position: relative;
    /* border: 1px solid rebeccapurple; */
    top: 5%;
}
</style>>
